package com.spring.demo.mq;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RocketMQMessageListener(topic = "COMMON_TOPIC", consumerGroup = "demo-group")
public class DemoConsumer implements RocketMQListener<Object> {

    @Override
    public void onMessage(Object message) {
        try {
            System.out.println(message);
        } catch (Exception e) {
            log.error("ReconciliationReceiptConsumer insertReconciliationReceipt return error e", e);
        }
    }

}
